package com.ruoyi.help.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.help.mapper.HelpStationMapper;
import com.ruoyi.help.domain.HelpStation;
import com.ruoyi.help.service.IHelpStationService;

/**
 * 消防站Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-06-13
 */
@Service
public class HelpStationServiceImpl implements IHelpStationService 
{
    @Autowired
    private HelpStationMapper helpStationMapper;

    /**
     * 查询消防站
     * 
     * @param id 消防站主键
     * @return 消防站
     */
    @Override
    public HelpStation selectHelpStationById(Long id)
    {
        return helpStationMapper.selectHelpStationById(id);
    }

    /**
     * 查询消防站列表
     * 
     * @param helpStation 消防站
     * @return 消防站
     */
    @Override
    public List<HelpStation> selectHelpStationList(HelpStation helpStation)
    {
        return helpStationMapper.selectHelpStationList(helpStation);
    }

    /**
     * 新增消防站
     * 
     * @param helpStation 消防站
     * @return 结果
     */
    @Override
    public int insertHelpStation(HelpStation helpStation)
    {
        helpStation.setCreateTime(DateUtils.getNowDate());
        return helpStationMapper.insertHelpStation(helpStation);
    }

    /**
     * 修改消防站
     * 
     * @param helpStation 消防站
     * @return 结果
     */
    @Override
    public int updateHelpStation(HelpStation helpStation)
    {
        helpStation.setUpdateTime(DateUtils.getNowDate());
        return helpStationMapper.updateHelpStation(helpStation);
    }

    /**
     * 批量删除消防站
     * 
     * @param ids 需要删除的消防站主键
     * @return 结果
     */
    @Override
    public int deleteHelpStationByIds(Long[] ids)
    {
        return helpStationMapper.deleteHelpStationByIds(ids);
    }

    /**
     * 删除消防站信息
     * 
     * @param id 消防站主键
     * @return 结果
     */
    @Override
    public int deleteHelpStationById(Long id)
    {
        return helpStationMapper.deleteHelpStationById(id);
    }
}
